//
//  KVConfig.swift
//  app_rn_frontend
//
//  Created by 鱼涛 on 2017/12/14.
//  Copyright © 2017年 Facebook. All rights reserved.
//

import Foundation
import WCDBSwift

final class KVConfig: TableCodable {
    static let table = "kv_config"

    var key: String = ""
    var value: String = ""

    enum CodingKeys: String, CodingTableKey {
        typealias Root = KVConfig
//        static let objectRelationalMapping = TableBinding(CodingKeys.self)
        case key
        case value
        
        static let objectRelationalMapping = TableBinding(CodingKeys.self) {
            BindColumnConstraint(.key, isPrimary: true, isAutoIncrement: false)
        }
        
//        static var columnConstraintBindings: [CodingKeys: ColumnConstraintBinding]? {
//            return [.key: ColumnConstraintBinding(isPrimary: true, isAutoIncrement: false)]
//        }
    }
}
